Optimal. Leaf size=173 \[ -\frac {8 a^3 (21 A-23 i B)}{105 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {2 (7 A-11 i B) \left (a^3 \cot (c+d x)+i a^3\right )}{35 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {8 a^3 (B+i A)}{d \sqrt {\cot (c+d x)}}+\frac {8 \sqrt [4]{-1} a^3 (A-i B) \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}+\frac {2 i a B (a \cot (c+d x)+i a)^2}{7 d \cot ^{\frac {7}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.54, antiderivative size = 173, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3581, 3593, 3591, 3529, 3533, 208} \[ -\frac {8 a^3 (21 A-23 i B)}{105 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {2 (7 A-11 i B) \left (a^3 \cot (c+d x)+i a^3\right )}{35 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {8 a^3 (B+i A)}{d \sqrt {\cot (c+d x)}}+\frac {8 \sqrt [4]{-1} a^3 (A-i B) \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}+\frac {2 i a B (a \cot (c+d x)+i a)^2}{7 d \cot ^{\frac {7}{2}}(c+d x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 208
Rule 3529
Rule 3533
Rule 3581
Rule 3591
Rule 3593
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (c+d x))^3 (A+B \tan (c+d x))}{\sqrt {\cot (c+d x)}} \, dx &=\int \frac {(i a+a \cot (c+d x))^3 (B+A \cot (c+d x))}{\cot ^{\frac {9}{2}}(c+d x)} \, dx\\ &=\frac {2 i a B (i a+a \cot (c+d x))^2}{7 d \cot ^{\frac {7}{2}}(c+d x)}+\frac {2}{7} \int \frac {(i a+a \cot (c+d x))^2 \left (\frac {1}{2} a (7 i A+11 B)+\frac {1}{2} a (7 A-3 i B) \cot (c+d x)\right )}{\cot ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 i a B (i a+a \cot (c+d x))^2}{7 d \cot ^{\frac {7}{2}}(c+d x)}-\frac {2 (7 A-11 i B) \left (i a^3+a^3 \cot (c+d x)\right )}{35 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {4}{35} \int \frac {(i a+a \cot (c+d x)) \left (a^2 (21 i A+23 B)+2 a^2 (7 A-6 i B) \cot (c+d x)\right )}{\cot ^{\frac {5}{2}}(c+d x)} \, dx\\ &=-\frac {8 a^3 (21 A-23 i B)}{105 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 i a B (i a+a \cot (c+d x))^2}{7 d \cot ^{\frac {7}{2}}(c+d x)}-\frac {2 (7 A-11 i B) \left (i a^3+a^3 \cot (c+d x)\right )}{35 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {4}{35} \int \frac {35 a^3 (i A+B)+35 a^3 (A-i B) \cot (c+d x)}{\cot ^{\frac {3}{2}}(c+d x)} \, dx\\ &=-\frac {8 a^3 (21 A-23 i B)}{105 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {8 a^3 (i A+B)}{d \sqrt {\cot (c+d x)}}+\frac {2 i a B (i a+a \cot (c+d x))^2}{7 d \cot ^{\frac {7}{2}}(c+d x)}-\frac {2 (7 A-11 i B) \left (i a^3+a^3 \cot (c+d x)\right )}{35 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {4}{35} \int \frac {35 a^3 (A-i B)-35 a^3 (i A+B) \cot (c+d x)}{\sqrt {\cot (c+d x)}} \, dx\\ &=-\frac {8 a^3 (21 A-23 i B)}{105 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {8 a^3 (i A+B)}{d \sqrt {\cot (c+d x)}}+\frac {2 i a B (i a+a \cot (c+d x))^2}{7 d \cot ^{\frac {7}{2}}(c+d x)}-\frac {2 (7 A-11 i B) \left (i a^3+a^3 \cot (c+d x)\right )}{35 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {\left (280 a^6 (A-i B)^2\right ) \operatorname {Subst}\left (\int \frac {1}{-35 a^3 (A-i B)-35 a^3 (i A+B) x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}\\ &=\frac {8 \sqrt [4]{-1} a^3 (A-i B) \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {8 a^3 (21 A-23 i B)}{105 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {8 a^3 (i A+B)}{d \sqrt {\cot (c+d x)}}+\frac {2 i a B (i a+a \cot (c+d x))^2}{7 d \cot ^{\frac {7}{2}}(c+d x)}-\frac {2 (7 A-11 i B) \left (i a^3+a^3 \cot (c+d x)\right )}{35 d \cot ^{\frac {5}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 15.18, size = 298, normalized size = 1.72 \[ \frac {a^3 \sin ^4(c+d x) (\cot (c+d x)+i)^3 (A \cot (c+d x)+B) \left (\frac {(\sin (3 c)+i \cos (3 c)) \sec ^2(c+d x) (10 ((31 B+21 i A) \cos (2 (c+d x))+21 i A+25 B)+21 (59 A-57 i B) \cot (c+d x)+21 (21 A-23 i B) \cos (3 (c+d x)) \csc (c+d x))}{210 \cot ^{\frac {3}{2}}(c+d x)}-8 e^{-3 i c} (A-i B) \sqrt {\frac {-1+e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {\frac {i \left (1+e^{2 i (c+d x)}\right )}{-1+e^{2 i (c+d x)}}} \tanh ^{-1}\left (\sqrt {\frac {-1+e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}}\right )\right )}{d (\cos (d x)+i \sin (d x))^3 (A \cos (c+d x)+B \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.65, size = 561, normalized size = 3.24 \[ -\frac {105 \, \sqrt {\frac {{\left (64 i \, A^{2} + 128 \, A B - 64 i \, B^{2}\right )} a^{6}}{d^{2}}} {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {{\left (8 \, {\left (A - i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt {\frac {{\left (64 i \, A^{2} + 128 \, A B - 64 i \, B^{2}\right )} a^{6}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (4 i \, A + 4 \, B\right )} a^{3}}\right ) - 105 \, \sqrt {\frac {{\left (64 i \, A^{2} + 128 \, A B - 64 i \, B^{2}\right )} a^{6}}{d^{2}}} {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {{\left (8 \, {\left (A - i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt {\frac {{\left (64 i \, A^{2} + 128 \, A B - 64 i \, B^{2}\right )} a^{6}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (4 i \, A + 4 \, B\right )} a^{3}}\right ) - 16 \, {\left ({\left (273 \, A - 319 i \, B\right )} a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 3 \, {\left (133 \, A - 109 i \, B\right )} a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} - 5 \, {\left (21 \, A - 19 i \, B\right )} a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 3 \, {\left (133 \, A - 129 i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 4 \, {\left (42 \, A - 41 i \, B\right )} a^{3}\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}}{420 \, {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3}}{\sqrt {\cot \left (d x + c\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 1.90, size = 1043, normalized size = 6.03 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.80, size = 219, normalized size = 1.27 \[ -\frac {2 \, {\left (15 i \, B a^{3} + \frac {{\left (21 i \, A + 63 \, B\right )} a^{3}}{\tan \left (d x + c\right )} + \frac {35 \, {\left (3 \, A - 4 i \, B\right )} a^{3}}{\tan \left (d x + c\right )^{2}} + \frac {{\left (-420 i \, A - 420 \, B\right )} a^{3}}{\tan \left (d x + c\right )^{3}}\right )} \tan \left (d x + c\right )^{\frac {7}{2}} + 105 \, {\left (\sqrt {2} {\left (-\left (2 i - 2\right ) \, A - \left (2 i + 2\right ) \, B\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \sqrt {2} {\left (-\left (2 i - 2\right ) \, A - \left (2 i + 2\right ) \, B\right )} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - \sqrt {2} {\left (-\left (i + 1\right ) \, A + \left (i - 1\right ) \, B\right )} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) + \sqrt {2} {\left (-\left (i + 1\right ) \, A + \left (i - 1\right ) \, B\right )} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} a^{3}}{105 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^3}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - i a^{3} \left (\int \frac {i A}{\sqrt {\cot {\left (c + d x \right )}}}\, dx + \int \left (- \frac {3 A \tan {\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\right )\, dx + \int \frac {A \tan ^{3}{\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\, dx + \int \left (- \frac {3 B \tan ^{2}{\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\right )\, dx + \int \frac {B \tan ^{4}{\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\, dx + \int \left (- \frac {3 i A \tan ^{2}{\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\right )\, dx + \int \frac {i B \tan {\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\, dx + \int \left (- \frac {3 i B \tan ^{3}{\left (c + d x \right )}}{\sqrt {\cot {\left (c + d x \right )}}}\right )\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________